local guanka = {}

-- 判断是否某界面通用方法
local function isXXX(args)
  local x, y = LuaAuxLib.FindMultiColor(args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8])
  local b = false
  LuaAuxLib.TracePrint("1111", x, y)
  if x > 0 and y > 0 then
    b = true
    LuaAuxLib.TracePrint("### ", b, x, y)
  end
  return b, x, y
end

-- 点击战斗图标
guanka.tapZhandou = function()
  local args = {4, 296, 710, 1006, "117FDC", "31|-40|7FF5FE,0|-77|90D6DC", 0, 0.9}
  local b, x, y = isXXX(args)
  if b then
    LuaAuxLib.Tap(x, y)
  end
  return b
end

-- 点击 Boss 开战
guanka.tapBossKaizhan = function()
  LuaAuxLib.Tap(338, 592)
end

-- 点击 Boss 战退出
guanka.tapBossTuichu = function()
  LuaAuxLib.Tap(652, 54)
end

-- 点击关闭按钮(战斗中)
guanka.tapClose_zhangdouzhong = function()
  LuaAuxLib.Tap(670, 164)
end

-- 点击关闭按钮
guanka.tapClose = function()
  LuaAuxLib.Tap(680, 90)
end
guanka.tapKaishiZhandou = function()
  LuaAuxLib.Tap(350, 694)
end

function QMPlugin.RegisterModule()
  LuaAuxLib.Modules = LuaAuxLib.Modules or {}
  LuaAuxLib.Modules.Jp_Guanka = guanka
end
